﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sinacor.UI.Bovespa.Ordens.Communication.Bovespa.Calendario.Calendario;
using Sinacor.Infra.UI.Common;

namespace Sinacor.UI.Bovespa.Ordens.Communication.Translator
{
    public class TranslateConsultarCalendario
    {

        private Model.Calendario Translate(CalendarioResponse from)
        {
            Model.Calendario to = new Sinacor.UI.Bovespa.Ordens.Model.Calendario();
            to.DataPregao = from.DataPregao;
            return to;
        }

        public ModelCollection<Model.Calendario> Translate(List<CalendarioResponse> response)
        {
            ModelCollection<Model.Calendario> model = new ModelCollection<Sinacor.UI.Bovespa.Ordens.Model.Calendario>();

            foreach (CalendarioResponse operador in response)
            {
                model.Add(Translate(operador));
            }

            return model;
        }


    }
}
